% Financial Toolbox
% Version 3.7.1 (R2010a) 25-Jan-2010
%
% Help and Documentation
%   Readme             - Release notes for the Financial Toolbox.
%   ftb                - Argument help headers.
%   calendar           - Contents of financial calendar functions
%   ftseries           - Contents of financial times series functions
%
% Formatting Currency and Price.
%   cur2frac           - Decimal currency values to fractional values.
%   cur2str            - Bank formatted text.
%   dec2thirtytwo      - Decimal to thirty-second.
%   frac2cur           - Fractional currency values to decimal values.
%   thirtytwo2dec      - Thirty-second to decimal.
%   
% Charts.
%   bar                - Bar chart from a FINTS object.
%   bar3               - Horizontal Bar chart from a FINTS object.
%   bar3h              - 3D Horizontal Bar chart from a FINTS object.
%   barh               - 3D Bar chart from a fints object.
%   bolling            - Bollinger Band chart.
%   candle             - Candlestick chart.
%   candle             - Candle plot from a FINTS object.
%   fints/chartfts     - Interactive charting of a FINTS object.
%   dateaxis           - Date axis labels.
%   highlow            - High, low, open, close chart.
%   highlow            - High-Low plot from a FINTS object.
%   movavg             - Leading and lagging moving averages chart.
%   plot               - Plot of data series in a FINTS object.
%   pointfig           - Point and figure chart.
%   
% Annuities.
%   annurate           - Periodic interest rate of annuity.
%   annuterm           - Number of periods to obtain value.
%   
% Amortization and Depreciation.
%   amortize           - Amortization.
%   depfixdb           - Fixed declining-balance depreciation.
%   depgendb           - General declining-balance depreciation.
%   deprdv             - Remaining depreciable value.
%   depsoyd            - Sum of years' digits depreciation.
%   depstln            - Straight line depreciation.
%
% Present and Future Value.
%   fvdisc             - Future value of discounted security.
%   fvfix              - Future value with fixed periodic payments.
%   fvvar              - Future value of varying cash flow.
%   pvfix              - Present value with fixed periodic payments.
%   pvvar              - Present value of varying cash flow.
%   
% Payment Calculations.
%   payadv             - Periodic payment given number of advance payments.
%   payodd             - Payment of annuity with odd first period.
%   payper             - Periodic payment of loan or annuity.
%   payuni             - Uniform payment equal to varying cash flow.
%   
% Rates of Return.
%   effrr              - Effective rate of return.
%   irr                - Internal rate of return.
%   mirr               - Modified internal rate of return.
%   nomrr              - Nominal rate of return.
%   taxedrr            - After-tax rate of return.
%   xirr               - Internal rate of return for nonperiodic cash flow.
%
% Accrued Interest.
%   acrubond           - Accrued interest of security with periodic interest payments.
%   acrudisc           - Accrued interest of security paying at maturity.
%   
% Prices.
%   bndprice           - Price of an SIA standard security.
%   prdisc             - Price of discounted security.
%   prmat              - Price with interest at maturity.
%   prtbill            - Price of treasury bill.
%   
% Term Structure of Interest Rates.
%   bndspread          - Spread of bond over entire underlying curve.
%   disc2zero          - Zero curve given a discount curve.
%   fwd2zero           - Zero curve given a forward curve.
%   prbyzero           - Price bonds from a zero curve.
%   pyld2zero          - Zero curve given a par yield curve.
%   tbl2bond           - Format treasury bill data.
%   termfit            - Term structure fitting with the Spline Toolbox (demonstration).
%   tr2bonds           - Format treasury bond data.
%   zbtprice           - Bootstrap zero rate curve from market bond prices.
%   zbtyield           - Bootstrap zero rate curve from market bond yields.
%   zero2disc          - Discount curve given a zero curve.
%   zero2fwd           - Forward curve given a zero curve.
%   zero2pyld          - Par yield curve given a zero curve.
%
% Yields.
%   beytbill           - Bond equivalent yield for treasury bill.
%   bndyield           - Yield of an SIA standard security.
%   discrate           - Discount rate of a security.
%   ylddisc            - Yield of discounted security.
%   yldmat             - Yield with interest at maturity.
%   yldtbill           - Yield of treasury bill.
%   
% Interest Rate Sensitivities.
%   bndconvp           - Convexity of an SIA standard security from price.
%   bndconvy           - Convexity of an SIA standard security from yield.
%   bnddurp            - Duration of an SIA standard security from price. 
%   bnddury            - Duration of an SIA standard security from yield.
%   
% Cash Flow Sensitivities.
%   cfconv             - Cash flow convexity and volatility.
%   cfdur              - Cash flow duration and modified duration.
%     
% Option Valuation and Sensitivity.
%   binprice           - Binomial put and call pricing.
%   blkimpv            - Black's implied volatility
%   blkprice           - Black's option pricing.
%   blsdelta           - Black-Scholes sensitivity to underlying price change.
%   blsgamma           - Black-Scholes sensitivity to underlying delta change.
%   blsimpv            - Black-Scholes implied volatility.
%   blslambda          - Black-Scholes elasticity.
%   blsprice           - Black-Scholes put and call values.
%   blsrho             - Black-Scholes sensitivity to interest rate change.
%   blstheta           - Black-Scholes sensitivity to time to maturity change.
%   blsvega            - Black-Scholes sensitivity to underlying price volatility.
%   opprofit           - Option profit.
%   
% Portfolio Analysis.
%   abs2active         - Convert constraints from absolute to active format.
%   active2abs         - Convert constraints from active to absolute format.
%   arith2geom         - Arithmetic to geometric moments of asset returns.
%   corr2cov           - Convert standard deviation and correlation to covariance.
%   cov2corr           - Convert covariance to standard deviation and correlation.
%   emaxdrawdown       - Expected maximum drawdown for Brownian motion with drift.
%   elpm               - Expected lower partial moments for normal asset returns.
%   ewstats            - Asset return and covariance estimation.
%   frontcon           - Efficient frontier with basic constraints.
%   frontier           - Rolling efficient frontier.
%   geom2arith         - Geometric  to arithmetic moments of asset returns.
%   holdings2weights   - Convert portfolio holdings to weights.
%   inforatio          - Compute the information ratio for one or more assets.
%   lpm                - Compute sample lower partial moments of return data.
%   maxdrawdown        - Compute maximum drawdown for a total equity price series.
%   pcalims            - Linear inequalities for individual asset allocation.
%   pcgcomp            - Linear inequalities for asset group comparison constraints.
%   pcglims            - Linear inequalities for asset group minimum and maximum allocation.
%   pcpval             - Linear inequalities for fixing total portfolio value.
%   periodicreturns    - Monthly total returns from daily total return prices.
%   portalloc          - Capital allocation.
%   portalpha          - Compute risk-adjusted alphas and returns for one or more assets.
%   portcons           - Portfolio constraints.
%   portopt            - Efficient frontier with arbitrary constraint set.
%   portrand           - Randomized portfolio risks, returns and weights.
%   portstats          - Portfolio risk and expected rate of return.
%   portsim            - Simulate multi-asset return time series.
%   portvrisk          - Portfolio value at risk.
%   ret2tick           - Asset return time series to price series.
%   selectreturn       - Portfolio configurations from 3-D efficient frontier.
%   sharpe             - Compute the Sharpe ratio for one or more assets. 
%   targetreturn       - Portfolio weight accuracy.
%   totalreturnprice   - Total return price time series.
%   tick2ret           - Asset price time series to return series.
%   weights2holdings   - Convert portfolio weights to holdings.
%
% Multivariate Normal Mean and Covariance with Missing Data.
%   ecmnfish           - Fisher information for multivariate normal data with missing data.
%   ecmnhess           - Hessian for multivariate normal data with missing data.
%   ecmninit           - Estimate initial mean and covariance.
%   ecmnmle            - Estimate mean and covariance of multivariate normal data with missing data.
%   ecmnobj            - Objective function for multivariate normal data with missing data.
%   ecmnstd            - Estimate standard errors of mean and covariance of 
%                        multivariate normal data with missing data.
%
% Least-Squares Regression with Missing Data.
%   ecmlsrmle          - Least-square parameter estimation with missing data.
%   ecmlsrobj          - Objective function for least-squares regression with missing data.
%
% Multivariate Normal Regression with Missing Data.
%   ecmmvnrfish        - Fisher information or Hessian for regression with missing data.
%   ecmmvnrmle         - Estimate regression parameters with missing data.
%   ecmmvnrobj         - Objective function for regression with missing data.
%   ecmmvnrstd         - Standard errors for regression with missing data.
%
% Multivariate Normal Regression without Missing Data.
%   mvnrfish           - Fisher information or Hessian for regression that ignores missing data.
%   mvnrmle            - Estimate regression parameters that ignores missing data.
%   mvnrobj            - Objective function for regression that ignores missing data.
%   mvnrstd            - Standard errors for regression that ignores missing data.
%
% Seemingly-Unrelated Regression.
%   convert2sur        - Convert multivariate normal regression into seemingly-unrelated regression.
%
% Volatility Analysis (ARCH/GARCH).
%   ugarch             - Univariate ARCH/GARCH parameter estimation.
%   ugarchllf          - Log-likelihood function of univariate GARCH parameters.
%   ugarchpred         - Forecast volatility based on a univariate GARCH process.
%   ugarchsim          - Simulate a univariate GARCH process.
%
% ============== Financial Time Series Functions ==============
%
% Financial Time Series Object Construction and Conversion.
%   ascii2fts          - Create a financial time series object from ASCII data file.
%   fints              - Construct a financial time series object: FINTS.
%   fts2ascii          - Write a FINTS object into an ASCII file.
%   fints/fts2mat      - Create a matrix from a FINTS object.
%   fints/merge        - Merge multiple Financial Time Series objects into a single FINTS object.
%
% Financial Time Series Overloaded Arithmetic Functions (Do not use directly).
%   end                - Index to the last date entry in a FINTS object.
%   horzcat            - Horizontal concatenation of FINTS objects.
%   length             - Get number of dates (rows).
%   minus              - Subtraction method of FINTS objects.  
%   mrdivide           - Division method of FINTS objects.
%   mtimes             - Multiplication method of FINTS objects.
%   plus               - Addition method of FINTS objects.  
%   power              - Power operation for FINTS objects.
%   rdivide            - Division method of FINTS objects.
%   size               - Get number of dates and data series.
%   subsasgn           - Assignment into a FINTS object.
%   subsref            - Indexing for the FINTS object.
%   times              - Multiplication method of FINTS objects.
%   uminus             - Unary minus plus for the FINTS objects.
%   uplus              - Unary plus for the FINTS objects.
%   vertcat            - Vertical concatenation of FINTS objects.
%
% Financial Time Series Mathematical Functions.
%   cumsum             - Cumulative sum of data series elements in a FINTS object.
%   exp                - Exponential of data series in a FINTS object.
%   hist               - Histogram of data series in a FINTS object.
%   log                - Natural logarithm of data series in a FINTS object.
%   log2               - Logarithm base 2 of data series in a FINTS object.
%   log10              - Common logarithm of data series in a FINTS object.
%   max                - Maximum value of data series in a FINTS object.
%   mean               - Arithmetic average of data series in a FINTS object.
%   min                - Minimum value of data series in a FINTS object.
%   std                - Standard deviation of data series in a FINTS object.
%
% Financial Time Series Utility Functions.
%   fints/chfield      - Change the existing name(s) of FINTS object series.
%   fints/extfield     - Extract data series from a FINTS object.
%   fints/fetch        - Extract data from FINTS object.
%   fieldnames         - Field names in a FINTS object.
%   fints/ftsbound     - Starting and ending dates of a FINTS object.
%   ftsinfo            - Retrieve FINTS object information.
%   ftsuniq            - Determine uniqueness.
%   getfield           - Get structure field contents of a FINTS object.
%   getnameidx         - Find name in list.
%   fints/iscompatible - Structural compatibility check of FINTS objects.
%   isequal            - Equality check of multiple FINTS objects.
%   isfield            - True if field is in FINTS object structure array.
%   issorted           - Check if dates and times are monotonically increasing.
%   rmfield            - Remove a field and its content from a FINTS object.
%   setfield           - Set structure field contents of a FINTS object.
%   fints/sortfts      - Sort contents of a FINTS object chronologically.
%
% Financial Time Series Data Transformation Functions.
%   boxcox             - Transform non-normal to a normal FINTS.
%   fints/convertto    - Convert a FINTS object periodicity.
%   diff               - Difference of the values in a FINTS object.
%   fints/fillts       - Fill NaNs in a FINTS object through interpolation.
%   filter             - Filter FINTS object components.
%   fints/lagts        - Delay a FINTS object values by a time step.
%   fints/leadts       - Advance a FINTS object values by a time step.
%   fints/peravg       - Periodic average of a FINTS object.
%   fints/resamplets   - Down-sample data in a FINTS object.
%   smoothts           - Smooth a FINTS object.
%   fints/toannual     - Convert a FINTS object to one with an annual freq. 
%   fints/todaily      - Convert a FINTS object to one with a daily freq.
%   todecimal          - Fractional to decimal conversion.
%   fints/tomonthly    - Convert a FINTS object to one with a monthly freq. 
%   fints/toquarterly  - Convert a FINTS object to one with a quarterly freq. 
%   toquoted           - Decimal to fracton conversion.
%   fints/tosemi       - Convert a FINTS object to one with a semiannual freq.
%   fints/toweekly     - Convert a FINTS object to one with a weekly freq. 
%   fints/tsmovavg     - Moving average of FINTS object data series.
%
% Financial Time Series Oscillators.
%   adosc              - Accumulation/Distribution (A/D) Oscillator of a FINTS object.
%   chaikosc           - Chaikin Oscillator of a FINTS object.
%   macd               - Moving Average Accumulation/Distribution Line of a FINTS object.
%   stochosc           - Stochastic Oscillator of a FINTS object.
%   tsaccel            - Acceleration between N periods of a FINTS object.
%   tsmom              - Momentum between N periods of a FINTS object.
%
% Financial Time Series Stochastics.
%   chaikvolat         - Chaikin's Volatility of a FINTS object.
%   fpctkd             - Fast PercentK (F%K) and Fast Percentd (F%D) of a FINTS object.
%   spctkd             - Slow Stochastics, S%K and S%D, for a FINTS object.
%   willpctr           - Williams PercentR (%R) of a FINTS object.
%
% Financial Time Series Indices.
%   negvolidx          - Negative Volume Index of a FINTS object.
%   posvolidx          - Positive Volume Index of a FINTS object.
%   rsindex            - Relative Strength Index (RSI) of a FINTS object.
%
% Financial Time Series Indicators.
%   adline             - Accumulation/Distribution Line of a FINTS object.
%   bollinger          - The Bollinger Band of a FINTS object.
%   hhigh              - Highest high of a FINTS object within the past N periods.
%   llow               - Lowest low of a FINTS object within the past N periods.
%   medprice           - Median Price of a FINTS object.
%   onbalvol           - On-Balance Volume of a FINTS object.
%   prcroc             - Volume Rate-of-Change of a FINTS object.
%   pvtrend            - Price and Volume Trend (PVT) of a FINTS object.
%   typprice           - Typical Price of a FINTS object.
%   volroc             - Volume Rate-of-Change of a FINTS object.
%   wclose             - Weighted Close of a FINTS object.
%   willad             - Williams Accumulation/Distribution Line of a FINTS object.
%   willpctr           - Williams %R.
%
% Financial Time Series Graphical User Interface.
%   ftsgui             - Financial Time Series Graphical User Interface.
%   ftstool            - Tool for creating/managing Financial Time Series objects.
%
% ============== Financial Calendar Functions ==============
%
% Current Time And Date.
%   now                - Current date and time.
%   today              - Current date.
%   
% Date and Time Components and Formats.
%   datefind           - Indices of date numbers in matrix.
%   datevec            - Date components.
%   day                - Day of month.
%   eomdate            - Last date of month.
%   eomday             - Last day of month.
%   hour               - Hour of date or time.
%   lweekdate          - Date of last occurrence of weekday in month.
%   minute             - Minute of date or time.
%   month              - Month of date.
%   months             - Number of whole months between dates.
%   nweekdate          - Date of specific occurrence of weekday in month.
%   second             - Second of date or time.
%   weekday            - Day of the week.
%   year               - Year of date.
%   yeardays           - Number of days in year.
%
% Date Conversion.
%   date2time          - Time and frequency from dates.
%   datedisp           - Display a matrix containing date number entries.
%   datenum            - Create date number.
%   datestr            - Create date string.
%   dec2thirtytwo      - Decimal quotation to thirty-second.
%   m2xdate            - MATLAB date to Excel date.
%   thirtytwo2dec      - Thirty-second quotation to decimal.
%   time2date          - Dates from time and frequency.
%   x2mdate            - Excel date to MATLAB date.   
%   
% Financial dates.
%   busdate            - Next or previous business day.
%   busdays            - Business days in serial date format.
%   datemnth           - Date of day in future or past month.
%   datewrkdy          - Date of future or past workday.
%   daysadd            - Days into future or past from any day count basis.
%   days360            - Days between dates based on 360 day year (SIA).
%   days360e           - Days between dates based on 360 day year (Europe).
%   days360isda        - Days between dates based on 360 day year (ISDA).
%   days360psa         - Days between dates based on 360 day year (PSA).
%   days365            - Days between dates based on 365 day year.
%   daysact            - Days between dates based on actual year.
%   daysadd            - Date away from a starting date for any day-count basis.
%   daysdif            - Days between dates for any day count basis.
%   fbusdate           - First business date of month.
%   holidays           - Holidays and non-trading days.
%   isbusday           - True for dates that are business days.
%   lbusdate           - Last business date of month.
%   thirdwednesday     - Third-Wednesday of the month.
%   wrkdydif           - Number of working days between dates.
%   yearfrac           - Fraction of year between dates.
%   
% Coupon bond dates.
%   accrfrac           - Accrued interest coupon period fraction.
%   cfamounts          - Cash flow amounts for a security.
%   cfdates            - Cash flow dates for a security.
%   cfport             - Portfolio form of cash flows.
%   cftimes            - Cash flow time factors for a security.
%   cpncount           - Coupons payable between dates.
%   cpndaten           - Next coupon date after date.
%   cpndatenq          - Next quasi-coupon date after date.
%   cpndatep           - Previous coupon date before date.
%   cpndatepq          - Previous quasi-coupon date before date.
%   cpndaysn           - Number of days between date and next coupon date.
%   cpndaysp           - Number of days between date and previous coupon date.
%   cpnpersz           - Size in days of period containing date.
%
%  Calendar (Graphical User Interface).
%   uicalendar         - Graphical calendar that interfaces with uicontrols.
%
%  If the previous text just scrolled off your screen, try:
%      more on, help finance, more off
 
% Copyright 1995-2006 The MathWorks, Inc. 
% Generated from Contents.m_template revision 1.1.6.7   $Date: 2009/03/09 19:12:21 $
 
% Exposed private functions
%   checkrng           - argument checking used in finance and calendar 
%   checksiz           - argument checking used in finance and calendar 
%   checktyp           - argument checking used in finance and calendar 
%   checkbond          - for BDT demos in findemos
%   checkcreditcrv     - for BDT demos in findemos
%   checkstruct        - for BDT demos in findemos
%   checkvolcrv        - for BDT demos in findemos
%   checkzerocrv       - for BDT demos in findemos
 
% Exposed helper functions
%   portalloptpoint    - for portalloc to fzero
%   portalltanpoint    - for portalloc to fzero
 
% Financial Time Series Tutorials.
%   intro_fints        - Creating FINTS objects. 
%   using_fints        - Using and manipulating FINTS objects.
%   tech_analysis      - Technical Analysis using FINTS objects.
%
% Financial Time Series Demos.
%   loadexpfts         - Loads example time series objects into the workspace.
%   predict_ret        - Using FINTS objects and regression to predict returns.
 
% Financial Time Series Toolbox Sample Data
%
% ASCII (text) data file.
%   disney.dat         - Walt Disney Corporation (Open/Close/High/Low/Volume) data.
%   dji30.dat          - Dow Jones Industrial Average (Open/Close/High/Low) data.
%   dji30mar94.dat     - Dow Jones Industrial Average (O/C/H/L) March 1994 data.
%   dji30apr94.dat     - Dow Jones Industrial Average (O/C/H/L) April 1994 data.
%   dji30may94.dat     - Dow Jones Industrial Average (O/C/H/L) May 1994 data.
%   dji30jun94.dat     - Dow Jones Industrial Average (O/C/H/L) June 1994 data.
%   ibm9599.dat        - IBM Corporation (Open/Close/High/Low/Volume) data.
%   whirlpool.dat      - Whirlpool Corporation (Open/Close/High/Low/Volume) data.
%
% MAT-file format datasets.
%   disney.mat         - Open, Close, High, Close, and Volume data plus the object.
%   dji30short.mat     - 4 (four) FINTS objects from the above 4 short data files.
%   ftsdata.mat        - Combination of DIS, IBM, and WHR time series data.
